package com.cls.business.entity;

import com.cls.common.handler.StringListTypeHandler;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cls.common.entity.BaseEntity;

import java.io.Serializable;
import java.util.List;

/**
 * 课题 Entity
 *
 * @author weimaomao
 * @date 2020-11-10 09:57:54
 */
@Data
@TableName(value = "biz_topic",autoResultMap = true)
public class Topic extends BaseEntity implements ITopic, Serializable {

    @TableId(value = "topic_id", type = IdType.AUTO)
    private Long topicId;

    /**
     * 课题编号
     */
    @TableField("topic_code")
    private String topicCode;

    /**
     * 生成课题编号后，根据此字段进行排序
     */
    @TableField("code_order")
    private Integer codeOrder;

    /**
     * 年份
     */
    @TableField("year")
    private String year;


    /**
     * 学科分类id
     */
    @TableField(value = "subject_type_codes",typeHandler = StringListTypeHandler.class)
    private List<String> subjectTypeCodes;

    /**
     * 课题名称
     */
    @TableField("topic_name")
    private String topicName;

    /**
     * 课题收集id
     */
    @TableField("select_id")
    private Long selectId;

    /**
     * 申报数
     */
    @TableField("declare_num")
    private Integer declareNum;

    /**
     * 资格审查通过数
     */
    @TableField("qualified_pass_num")
    private Integer qualifiedPassNum;

    /**
     * 立项数
     */
    @TableField("project_num")
    private Integer projectNum;

    /**
     * 计划id
     */
    @TableField("plan_id")
    private Long planId;
    /**
     * 专家名字
     */
    @TableField("expert_names")
    private String expertNames;


    @TableField(exist = false)
    List<TopicSubject> topicSubjects;

    @TableField(exist = false)
    private String subjectTypeCode;

    @TableField("status_type_code")
    private String statusTypeCode;

    @TableField("topic_classify_code")
    private String topicClassifyCode;

    @TableField("topic_level_type")
    private String topicLevelType;

    @TableField(exist = false)
    private String parentTopicLevelType;

    @TableField(exist = false)
    private String planNo;

    @TableField(exist = false)
    private String planStatusCode;


}
